package cn.xerllent.wxtp.test;

import java.util.List;

import javax.annotation.Resource;

import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageHelper;

import cn.xerllent.wxtp.entity.Dksb;
import cn.xerllent.wxtp.service.DksbCourseService;
import cn.xerllent.wxtp.service.DksbService;
import cn.xerllent.wxtp.service.dto.DksbFilter;



@SpringBootTest
class myTest1 {
	
    @Resource
    private DksbCourseService dksbCourseService;
    
    @Resource
    private DksbService dksbService;

    @Test
    @Order(1)
    void test1() {
    	
    	try {
    		DksbFilter filter = new DksbFilter();
    		filter.setCorpId("wpWfR_DwAAEJe9ME6RfER10oAyONbfpg").setGrade("01");
    		
    		List<Dksb> list = dksbService.queryAll(filter);
    		
    		System.err.print(JSON.toJSONString(list));
    		
            PageHelper.offsetPage(0, 2, false);
    		list = dksbService.queryAll(filter);
    		System.err.print(JSON.toJSONString(list));
    		
            PageHelper.offsetPage(2, 2, false);
    		list = dksbService.queryAll(filter);
    		System.err.print(JSON.toJSONString(list));
    		
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

    }

}